<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:a4j="http://richfaces.org/a4j"
                 xmlns:rich="http://richfaces.org/rich"
                 xmlns:fn="http://java.sun.com/jsp/jstl/functions"
                 xmlns:c="http://java.sun.com/jsp/jstl/core">
    <style type="text/css">
        .hvClass{
            background-color: #74b2e2;
        }
        *.rf-pm-itm-sel{
            font-style: normal;
            background-color: #ECF3FE !important;
        }
        *.rf-pm-gr-sel{
            font-style:italic;
            background-color: #FCFFFE;
        }
        .menu{
            vertical-align: top;
            overflow: hidden;
            background-color: white;
            margin: 0px 0px 50px 0px;
        }
    </style>
    <h:form id="fm">
        <div id="nav" class="menu">
            <rich:panelMenu id="pm" groupMode="client"
                            groupExpandedLeftIcon="triangleUp"
                            groupCollapsedLeftIcon="triangleDown"
                            topGroupExpandedRightIcon="chevronUp"
                            topGroupCollapsedRightIcon="chevronDown"
                            itemLeftIcon="disc">
                <c:forEach items="#{sysmenu.menuItemList}" var="item" varStatus="varStatus">

                    <rich:panelMenuItem label="#{item.name}" mode="server" rendered="#{item.isEnd}" immediate="true"
                                        style="font-weight: bolder;">
                        <f:param name="contentPage" value="#{item.url}"/>
                    </rich:panelMenuItem>
                    <rich:panelMenuGroup label="#{item.name}" rendered="#{!item.isEnd}" expanded="#{item.name eq '报销管理'}">
                        <c:forEach items="#{item.subList}" var="item1">

                            <rich:panelMenuItem label="#{item1.name}" mode="server"
                                                rendered="#{item1.isEnd}" immediate="true">
                                <f:param name="contentPage" value="#{item1.url}"/>
                            </rich:panelMenuItem>
                            <rich:panelMenuGroup label="#{item1.name}" rendered="#{!item1.isEnd}">
                                <c:forEach items="#{item1.subList}" var="item2">

                                    <rich:panelMenuItem label="#{item2.name}" mode="server" rendered="#{item2.isEnd}" immediate="true">
                                        <f:param name="contentPage" value="#{item2.url}"/>
                                    </rich:panelMenuItem>
                                    <rich:panelMenuGroup label="#{item2.name}" rendered="#{!item2.isEnd}">
                                        <c:forEach items="#{item2.subList}" var="item3">

                                            <rich:panelMenuItem label="#{item3.name}" mode="server" rendered="#{item3.isEnd}" immediate="true">
                                                <f:param name="contentPage" value="#{item3.url}"/>
                                            </rich:panelMenuItem>
                                            <rich:panelMenuGroup label="#{item3.name}" rendered="#{!item3.isEnd}">
                                                <c:forEach items="#{item3.subList}" var="item4">

                                                    <rich:panelMenuItem label="#{item4.name}" mode="server" rendered="#{item4.isEnd}" immediate="true">
                                                        <f:param name="contentPage" value="#{item4.url}"/>
                                                    </rich:panelMenuItem>
                                                    <rich:panelMenuGroup label="#{item4.name}" rendered="#{!item4.isEnd}">
                                                        <c:forEach items="#{item4.subList}" var="item5">

                                                            <rich:panelMenuItem label="#{item5.name}" mode="server" rendered="#{item5.isEnd}" immediate="true">
                                                                <f:param name="contentPage" value="#{item5.url}"/>
                                                            </rich:panelMenuItem>
                                                            <rich:panelMenuGroup label="#{item5.name}" rendered="#{!item5.isEnd}">
                                                                <c:forEach items="#{item5.subList}" var="item6">

                                                                    <rich:panelMenuItem label="#{item6.name}" mode="server" rendered="#{item6.isEnd}" immediate="true">
                                                                        <f:param name="contentPage" value="#{item6.url}"/>
                                                                    </rich:panelMenuItem>
                                                                    <rich:panelMenuGroup label="#{item6.name}" rendered="#{!item6.isEnd}">
                                                                        <c:forEach items="#{item6.subList}" var="item7">

                                                                            <rich:panelMenuItem label="#{item7.name}" mode="server" rendered="#{item7.isEnd}" immediate="true">
                                                                                <f:param name="contentPage" value="#{item7.url}"/>
                                                                            </rich:panelMenuItem>
                                                                            <rich:panelMenuGroup label="#{item7.name}" rendered="#{!item7.isEnd}">
                                                                                <!-- 可在此继续添加 -->
                                                                            </rich:panelMenuGroup>

                                                                        </c:forEach>
                                                                    </rich:panelMenuGroup>

                                                                </c:forEach>
                                                            </rich:panelMenuGroup>

                                                        </c:forEach>
                                                    </rich:panelMenuGroup>

                                                </c:forEach>
                                            </rich:panelMenuGroup>

                                        </c:forEach>
                                    </rich:panelMenuGroup>

                                </c:forEach>
                            </rich:panelMenuGroup>

                        </c:forEach>
                    </rich:panelMenuGroup>

                </c:forEach>
            </rich:panelMenu>
        </div>
    </h:form>
</ui:composition>

